# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Tobias Roettger <toroettg@gmail.com>

pkgname=python2-ordered-set
pkgver=3.1.1
pkgrel=3
pkgdesc='A MutableSet that remembers its order, so that every entry has an index'
arch=('any')
url="https://github.com/LuminosoInsight/ordered-set"
license=('MIT')
depends=('python2')
makedepends=('python2-setuptools')
checkdepends=('python2-pytest')
source=("https://pypi.io/packages/source/o/ordered-set/ordered-set-$pkgver.tar.gz")
md5sums=('6e12312c8dc4c90fe840e86e8a352644')

build() {
  cd ordered-set-$pkgver
  python2 setup.py build
}

check() {
  cd ordered-set-$pkgver
  pytest2 --doctest-modules test.py ordered_set.py README.md --doctest-glob=README.md --ignore=setup.py
}

package() {
  cd ordered-set-$pkgver
  python2 setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 MIT-LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}

# vim:set ts=2 sw=2 et:
